package com.ys.erp.entity.data.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * @author lwj
 * @date 2025/6/20
 */
    
@Data
@TableName(value = "t_wfb_order_water")
public class WfbOrderWater {

    public static List<String> unPerformanceFlagList = new ArrayList<>();
    public static List<String> paidFlagList = new ArrayList<>();
    public static List<String> payFailFlagList = new ArrayList<>();

    static {
        unPerformanceFlagList.add("PAID");
        unPerformanceFlagList.add("PAY_FAILED");
        unPerformanceFlagList.add("UNCREATED");
        unPerformanceFlagList.add("CANCEL");
        unPerformanceFlagList.add("1");
        unPerformanceFlagList.add("3");
        unPerformanceFlagList.add("4");
        paidFlagList.add("PAID");
        paidFlagList.add("2");
        payFailFlagList.add("PAY_FAILED");
        payFailFlagList.add("3");
    }

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 店铺编码
     */
    @TableField(value = "shop_code")
    private String shopCode;

    /**
     * 店铺名字
     */
    @TableField(value = "shop_name")
    private String shopName;

    /**
     * 微分呗商品名称
     */
    @TableField(value = "wfb_product_name")
    private String wfbProductName;

    /**
     * 微分呗签约人昵称
     */
    @TableField(value = "wfb_nick_name")
    private String wfbNickName;

    /**
     * 微分呗签约人手机号
     */
    @TableField(value = "wfb_phone")
    private String wfbPhone;

    /**
     * 微分呗签约人支付宝ali2088码
     */
    @TableField(value = "wfb_alipay_user_id")
    private String wfbAlipayUserId;

    /**
     * 微分呗订购编号
     */
    @TableField(value = "wfb_subscription_no")
    private String wfbSubscriptionNo;

    /**
     * 微分呗商户 外部订单号 全平台端唯一
     */
    @TableField(value = "wfb_out_subscription_no")
    private String wfbOutSubscriptionNo;

    /**
     * 微分呗商户商品订单 支付宝后面服务提报需要
     */
    @TableField(value = "wfb_product_no")
    private String wfbProductNo;

    /**
     * 微分呗每期金额 单位分
     */
    @TableField(value = "wfb_deduction_amount")
    private Long wfbDeductionAmount;

    /**
     * 微分呗计划扣款时间戳
     */
    @TableField(value = "wfb_plan_pay_date")
    private Integer wfbPlanPayDate;

    /**
     * 微分呗订购计划期数
     */
    @TableField(value = "wfb_period")
    private Integer wfbPeriod;

    /**
     * 微分呗流水状态 ：
下单中 ORDERING,
下单成功 ORDERED，
支付成功 PAID，
扣款失败 PAY_FAILED,
未成订单 UNCREATED ,已取消 CANCEL
     */
    @TableField(value = "wfb_status")
    private String wfbStatus;

    /**
     * 微分呗实际扣款时间
     */
    @TableField(value = "wfb_payment_ts_local")
    private Integer wfbPaymentTsLocal;

    /**
     * 微分呗商家订单号
     */
    @TableField(value = "wfb_order_no")
    private String wfbOrderNo;

    /**
     * 微分呗芝麻后付订单号
     */
    @TableField(value = "wfb_credit_biz_order_id")
    private String wfbCreditBizOrderId;

    /**
     * 微分呗订单时间戳
     */
    @TableField(value = "wfb_order_date")
    private Integer wfbOrderDate;

    /**
     * 微分呗扣款失败次数
     */
    @TableField(value = "wfb_failed_times")
    private Integer wfbFailedTimes;

    /**
     * 微分呗失败原因
     */
    @TableField(value = "wfb_failed_msg")
    private String wfbFailedMsg;

    /**
     * 是否自动充值过0否1是
     */
    @TableField(value = "is_in_moneyed")
    private Integer isInMoneyed;

    /**
     * 返款比列
     */
    @TableField(value = "refund_ratio")
    private String refundRatio;

    @TableField(value = "version")
    @Version
    private Integer version;

    @TableField(value = "create_time")
    private LocalDateTime createTime;

    @TableField(value = "update_time", update = "now()")
    private LocalDateTime updateTime;
}